package com.kermel.andromeda.data.settings;

import com.kermel.andromeda.data.DateDisplayType;
import com.kermel.andromeda.data.settings.ClockSettings;

import junit.framework.TestCase;

public class ClockSettingsTest extends TestCase {
    private ClockSettings clockSettings;
    
    protected void setUp() throws Exception {
        super.setUp();
        
        clockSettings = new ClockSettings();
    }

    protected void tearDown() throws Exception {
        clockSettings = null;
        
        super.tearDown();
    }
    
    public void testMilitaryTimeDefaultsToFalse() {
        assertFalse(clockSettings.militaryTime);
    }
    
    public void testGettingSettingMilitaryTime() {
        clockSettings.militaryTime = true;
        assertTrue(clockSettings.militaryTime);
    }

    public void testDisplaySecondsDefaultsToFalse() {
        assertFalse(clockSettings.displaySeconds);
    }
    
    public void testGettingSettingDisplaySeconds() {
        clockSettings.displaySeconds = true;
        assertTrue(clockSettings.displaySeconds);
    }
    
    public void testGettingSettingDisplayDate() {
        clockSettings.displayDate = true;
        assertTrue(clockSettings.displayDate);
    }
    
    public void testDateDisplayTypeDefaultsToNone() {
        assertTrue(clockSettings.dateDisplayType == DateDisplayType.NONE);
    }
    
    public void testGettingSettingDateDisplayTypeShort() {
        clockSettings.dateDisplayType = DateDisplayType.SHORT;
        assertEquals(DateDisplayType.SHORT, clockSettings.dateDisplayType);
    }
    
    public void testGettingSettingDateDisplayTypeFull() {
        clockSettings.dateDisplayType = DateDisplayType.FULL;
        assertEquals(DateDisplayType.FULL, clockSettings.dateDisplayType);
    }
}
